package com.open.capacity.notice.provider.sms;

import java.text.MessageFormat;

import org.springframework.web.bind.annotation.RequestMethod;

import com.open.capacity.notice.provider.core.http.ApiAdress;

/**
 * 掌中无线 全网短信API
 *
 */
public enum SmsApiAddress implements ApiAdress {

	/**
	 * 118.212.186.124:8081
	 */
	// ---------------- 短信发送------------------
	SEND_SMS("发送短信消息", RequestMethod.POST, "http://{0}/api/sms/send "),

	;

	private String opt;

	private RequestMethod method;
	private String url;

	SmsApiAddress(String opt, RequestMethod method, String url) {
		this.opt = opt;
		this.method = method;
		this.url = url;
	}

	public String getOpt() {
		return opt;
	}

	public RequestMethod getMethod() {
		return method;
	}

	public String getUrl() {
		return url;
	}

	public String getUrl(Object... args) {
		return MessageFormat.format(url, args);
	}

}
